# -------------------------------------------- # HEWLETT·PACKARD 15C Simulator program # Created with version 3.0.RC2 # -------------------------------------------- #T:Nimb Game for the HP-15C #D:The Object of the game is to get your opponent take the last match stick.\nYou can play an almost endless set of games, because you set the rules\nof each game with the A and B function keys.\n\nExample:\n\n3 A (For this game, players can take a maximum of 3 sticks per move)\n15 B (Start this game with 15 sticks on the pile)\n2 R/S (You pick up 2 sticks, the Calculator picks 1 leaving -12)\n3 R/S (You pick 3 sticks, the Calculator picks 1 stick leaving -8)\n3 R/S (You pick up 3 sticks, the Calculator picks 1 leaving -4)\n3 R/S (You pick up 3 sticks, leaving the Calculator to take the last one)\n(Displays 3507.1 I LOSE upside down. You win the Calculator loses) #L-1:Sets the maximum number of sticks you can take in each move. #L-2:Sets the number of sticks on the pile to start with. #L0:Check validity of player's move, and compute Calculator's move. #L1:Game Over (Display Win, or Lose Message) #L2:Check to see if Player Won. #L4:Display Sticks left on pile (Ready for Player's Move) #R0:Total (Pile) #R1:Max Grab per move+1 #R2:I.Lose (upside down Calculator loses You win) #R3:Bliss (upside down Calculator wins You lose) # -------------------------------------------- 000 { } 001 { 42 21 11 } f LBL A 002 { 44 0 } STO 0 003 { 1 } 1 004 { 40 } ✛ 005 { 44 1 } STO 1 006 { 3 } 3 007 { 5 } 5 008 { 0 } 0 009 { 7 } 7 010 { 48 } . 011 { 1 } 1 012 { 44 2 } STO 2 013 { 5 } 5 014 { 5 } 5 015 { 1 } 1 016 { 7 } 7 017 { 8 } 8 018 { 44 3 } STO 3 019 { 45 0 } RCL 0 020 { 42 21 1 } f LBL 1 021 { 31 } R/S 022 { 42 21 12 } f LBL B 023 { 42 7 0 } f FIX 0 024 { 44 0 } STO 0 025 { 42 21 4 } f LBL 4 026 { 16 } CHS 027 { 31 } R/S 028 { 40 } ✛ 029 { 43 30 2 } g TEST x<0 030 { 22 0 } GTO 0 031 { 45 3 } RCL 3 032 { 22 1 } GTO 1 033 { 42 21 0 } f LBL 0 034 { 43 36 } g LSTx 035 { 1 } 1 036 { 43 30 7 } g TEST x>y 037 { 22 2 } GTO 2 038 { 33 } R⬇ 039 { 45 1 } RCL 1 040 { 43 10 } g x≤y 041 { 22 2 } GTO 2 042 { 34 } x↔y 043 { 44 30 0 } STO − 0 044 { 45 0 } RCL 0 045 { 42 31 } f PSE 046 { 1 } 1 047 { 30 } − 048 { 45 1 } RCL 1 049 { 10 } ÷ 050 { 42 44 } f FRAC 051 { 45 1 } RCL 1 052 { 20 } ✕ 053 { 43 20 } g x=0 054 { 1 } 1 055 { 44 30 0 } STO − 0 056 { 42 21 2 } f LBL 2 057 { 45 0 } RCL 0 058 { 43 30 0 } g TEST x≠0 059 { 22 4 } GTO 4 060 { 45 2 } RCL 2 061 { 42 7 1 } f FIX 1 062 { 22 1 } GTO 1 # --------------------------------------------